import { defAxios as request } from '@/utils/http';

export function useDictApi() {
	return {
		getDistData: (params) => {
			return request({
				url: '/dict/getDictData',
				method: 'post',
				data: params,
			});
		},
		/**
		 * 获取表单流程分类数据
		 * @param {*} type: 1-表单 2-流程
		 * @returns axios
		 */
		getFormWorkflowType: (type) => {
			return request({
				url: '/dict/getFromProcessClassifyByType',
				method: 'post',
				data: {
					type,
				},
			});
		},
	};
}
